package com.qf.controller;

import com.qf.dto.R;
import com.qf.entity.SysUserRoleKey;
import com.qf.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ztf
 * @Date 19:51 2022/1/10
 **/
@RestController
@RequestMapping("userrole")
public class UserRoleController {
    private UserRoleService userRoleService;

    @Autowired
    public void setUserRoleService(UserRoleService userRoleService) {
        this.userRoleService = userRoleService;
    }

    @PostMapping("adduserrrole")
    public R addUserRole(SysUserRoleKey userRoleKey) {
        userRoleService.addUserRole(userRoleKey);
        return R.setOK();
    }
}
